package com.cy.pj.eiems.dao;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import com.cy.pj.eiems.entity.EiemsAgencyInformation;


@Mapper
public interface EiemsAgencyInformationDao {
	
	List<EiemsAgencyInformation> findObjects (
			@Param("name")String  name,
		    @Param("startIndex")Integer startIndex,
		    @Param("pageSize")Integer pageSize);

	int getRowCount(@Param("name")String name);
	
	@Update("update agency_information set score=\r\n" + 
			"(select avg(a.score) from agency_comment a where a.comment_id= 1) where id=1;")
	int insertAvgScore(); 
}
